﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SimpleNotify.ClientLibrary.Translators
{
    public static class PushResultArrayTranslator
    {
        public static NotifyService.PushResult[] EntityToDataContract(PushResult[] from)
        {
            List<NotifyService.PushResult> to = new List<NotifyService.PushResult>();
            foreach (var fromItem in from)
            {
                NotifyService.PushResult toItem = PushResultTranslator.EntityToDataContract(fromItem);
               to.Add(toItem);
            }
            return to.ToArray();
        }

        public static PushResult[] DataContractToEntity(NotifyService.PushResult[] from)
        {
            List<PushResult> to = new List<PushResult>();
            foreach (var fromItem in from)
            {
                PushResult toItem = PushResultTranslator.DataContractToEntity(fromItem);
                to.Add(toItem);
            }
            return to.ToArray();
        }
    }
}
